package input.pilot;

import logic.common.player.Player;

import ai.AIController;

import com.jme.math.Quaternion;

public class MoveToMissionController extends AIController {
	
	private static final long serialVersionUID = 1L;
	
	protected Player player;
	
	protected Quaternion targetRot;
	
	public MoveToMissionController(Player player) {
		super(player.getHunter(), 0f);
		this.player = player;
	}
	
	@Override
	public void delayedUpdate(float time) {
		if(!player.isAlive()) {
			player.getHunter().removeMoveToMissionController();
		} else {
			float amount = time;
			rotateTo(amount, player.getActiveMission().getMissionLocation());
		}
	}
}